<div th:fragment="html">
    <!-- Main Navbar-->
    <header >
        <nav class="navbar">

            <!-- Search Box-->
            <div class="container-fluid">
                <div class="navbar-holder d-flex align-items-center justify-content-between">
                    <!-- Navbar Header-->
                    <div >
                        <span><a href="home">南华大学租房网欢迎您</a></span>
                    </div>
                    <!-- Navbar Menu -->
                    <ul class="nav-menu list-unstyled d-flex flex-md-row align-items-md-center">
                        <span th:if="${null!=session.user}">
                            当前用户：
                            <a href="#" th:text="${session.user.name}" style="padding-right:30px"></a>
                            <a href="forelogout" >退出登录</a>
                        </span>
                        <span th:if="${null==session.user}">
                            <a href="login">请登录</a>
                            <a href="register">免费注册</a>
                        </span>
                    </ul>
                </div>
            </div>
        </nav>
    </header>
</div>